package com.atguigu.eduservice.client;

import com.atguigu.commonutils.R;
import com.atguigu.eduservice.client.impl.VodFileDegradeFeignClient;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;
//,熔断器
@FeignClient(name="service-vod",fallback = VodFileDegradeFeignClient.class)
@Component
public interface VodClient {

    @DeleteMapping(value = "/eduvod/video/removeVideo/{videoId}")
    //需要指明参数
    public R removeVideo(@PathVariable("videoId") String videoId);

    @DeleteMapping(value="/eduvod/video/removeVideoBatch")
    public R removeVideoBatch(@RequestParam("list") List<String> list);
}
